// mypage/member/member.js
var app=getApp();
var my=require("../../api/my");


Page({
  /*页面的初始数据*/
  data: {
    navColor:'rgba(0,0,0,0)',
    title: "VIP家长",
    info: '',
    vip: 1,
    money: 399,
    total_money: 1000,
    hide: true
  },
  /*生命周期函数--监听页面加载*/
  onLoad: function (options) {
    var that=this;
    that.get_personal_dom(options.id)
  },
  // 获取个人资料
  get_personal_dom:function(id){
    wx.showLoading({title:"加载中"})
    var that=this;
    my.get_personal_dom({"id":id}).then(res=>{
      if(res.data.code==200){
        var info=res.data.data;
        that.setData({info:info})
      }
    })
  },
  open_mask:function(){
    this.setData({hide:!this.data.hide})
  },
  nav_home:function(){
    this.open_mask()
    wx.switchTab({
      url: '../../pages/home/home',
    })
  },
})